FROM debian:11
ARG PIP_URL=https://pypi.tuna.tsinghua.edu.cn/simple
ARG WK_DIR=/home/jakauser/scorpio_os

RUN useradd -l -m -p jaka007 -u 1000 -s /bin/bash -U jakauser && echo "root:jaka555301" | chpasswd

RUN echo \ 
    "deb http://mirrors.aliyun.com/debian/ bullseye main contrib non-free\n" \
    "deb http://mirrors.aliyun.com/debian-security bullseye-security main contrib non-free\n" \
    > /etc/apt/sources.list \
    && dpkg --add-architecture i386 \
    && apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cmake gcc g++ build-essential git libboost-dev \
    libc6:i386 libstdc++6:i386 libc6-dev-i386 g++-multilib gcc-multilib \
    python3 python3-dev python3-pip python3-venv python3-numpy \
    libgtest-dev libgmock-dev patchelf clang-tidy-16 \
    && apt-get -y autoremove \
    && apt-get -y clean 

RUN echo "" > /usr/bin/systemctl && chmod +x /usr/bin/systemctl \
    && mkdir -p /etc/udev/rules.d ${WK_DIR}
WORKDIR ${WK_DIR}

USER jakauser
